package com.zjitc;

import com.config.Configruation1;
import com.obj.Teacher;
import com.obj.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/13 14:07
 * @description:
 */
@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(classes = Configruation1.class)
@ContextConfiguration(locations = {"classpath:configXml2.xml"})
public class ConfigTest1 {
@Autowired
  private User user;
@Test
  public void testgetUser()
{
  System.out.println(user.getTeacher());
}
}
